package com.monika.main.system.factory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Objects;

/**
 * @Author whh
 * @Date: 2023/04/15/ 0:27
 * @description
 */
public class LogManager {


    private LogManager() {
    }


    private static final LogManager LOG = new LogManager();


    public static LogManager LOG(){return LOG;}




    public Logger sys_user_log(Class<?> clazz){
        if(Objects.nonNull(clazz)){
            return LoggerFactory.getLogger(clazz);
        }
        return LoggerFactory.getLogger("sys-user-log");
    }


    public Logger sys_operate_log(Class<?> clazz){
        if(Objects.nonNull(clazz)){
            return LoggerFactory.getLogger(clazz);
        }
        return LoggerFactory.getLogger("sys-operate-log");
    }


    public Logger sys_global_exception_log(Class<?> clazz){
        if(Objects.nonNull(clazz)){
            return LoggerFactory.getLogger(clazz);
        }
        return LoggerFactory.getLogger("sys-global-exception-log");
    }


    public Logger sys_http_client_log(Class<?> clazz){
        if(Objects.nonNull(clazz)){
            return LoggerFactory.getLogger(clazz);
        }
        return LoggerFactory.getLogger("sys-http-client-log");
    }



    public Logger sys_common_log(Class<?> clazz){
        if(Objects.nonNull(clazz)){
            return LoggerFactory.getLogger(clazz);
        }
        return LoggerFactory.getLogger("sys-common-log");
    }
}
